package top.goldenyear.porpoise.common.core.util.tree;

import java.io.Serial;
import java.io.Serializable;

/**
 * @author airhead
 */
public abstract class BaseNode<T, N extends BaseNode<T, ?>> implements INode<N>, Serializable {
  @Serial private static final long serialVersionUID = -444474547414771112L;

  /**
   * 获取id
   *
   * @return T
   */
  public abstract T getId();

  /**
   * 设置id
   *
   * @param id T
   */
  public abstract void setId(T id);

  /**
   * 获取父ID
   *
   * @return T
   */
  public abstract T getParentId();

  /**
   * 设置父ID
   *
   * @param parentId T
   */
  public abstract void setParentId(T parentId);
}
